package com.hongtu.brank1.web;

import com.hongtu.brank1.service.AccountInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @Autowired
    AccountInfoService accountInfoService;


    @GetMapping("/hello")
    public String oneHello(@RequestParam("amount") Double amount) {
        accountInfoService.updateAccountBalance("1", amount);
        return "bank1" + amount;
    }
}
